how to check if list index is out of range in c#

93

how to check if list index is out of range in c# -

if(index >= 0 && index < array.Length)
{
    //it exists
}

Comments

Submit
0 Comments